#pragma once
#include "stdafx.h"

// this is the class that will be the base of CSmartPtr,
// which is only to generic the template. For later the CSmartPtr<T>
// will be added into the CSmartPtrManager.
// this is the normal technic.
class LinkNode
{
private:
	// the size of the CSmartPtr<T> by the specified T
	size_t size;

	// indicate which generation this LinkNode currently belong to
	int generation;

protected:
	void SetSize(size_t size) {this->size = size; }

public:
	size_t GetSize() {return size; }

	int GetOriginalGeneration() {return generation; }
	void SetOriginalGeneration(int generation) {this->generation = generation; }

	LinkNode()
		: size(0), generation(0)
	{}
};